package com.jack.xiaoer.entity;

import com.jack.xiaoer.constant.OrderStateEnum;
import com.jack.xiaoer.constant.PayTypeEnum;
import com.jack.xiaoer.validator.Groups;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.Instant;

/**
 * Created by Jackaroo Zhang on 2018/12/14.
 */
public class Order {

    @NotNull(message = "订单ID不能为空", groups = {Groups.OrderUpdate.class})
    private Long id;

    private String orderCode;

    private Long shopId;

    private String shopName;

    private Long userId;

    private String note;

    private Instant expectedTime;

    private BigDecimal totalPrice;

    private BigDecimal settlePrice;

    private PayTypeEnum payType;

    private Integer state;

    private Long totalTimeCost;

    private String property;

    private Instant gmtCreate;

    private Instant gmtModified;

    @Override
    public String toString() {
        return "Order{" +
                "id=" + id +
                ", orderCode='" + orderCode + '\'' +
                ", shopId=" + shopId +
                ", shopName='" + shopName + '\'' +
                ", userId=" + userId +
                ", note='" + note + '\'' +
                ", expectedTime=" + expectedTime +
                ", totalPrice=" + totalPrice +
                ", settlePrice=" + settlePrice +
                ", payType=" + payType +
                ", state=" + state +
                ", totalTimeCost=" + totalTimeCost +
                ", property='" + property + '\'' +
                ", gmtCreate=" + gmtCreate +
                ", gmtModified=" + gmtModified +
                '}';
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getOrderCode() {
        return orderCode;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public Instant getExpectedTime() {
        return expectedTime;
    }

    public void setExpectedTime(Instant expectedTime) {
        this.expectedTime = expectedTime;
    }

    public BigDecimal getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
    }

    public BigDecimal getSettlePrice() {
        return settlePrice;
    }

    public void setSettlePrice(BigDecimal settlePrice) {
        this.settlePrice = settlePrice;
    }

    public PayTypeEnum getPayType() {
        return payType;
    }

    public void setPayType(PayTypeEnum payType) {
        this.payType = payType;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Long getTotalTimeCost() {
        return totalTimeCost;
    }

    public void setTotalTimeCost(Long totalTimeCost) {
        this.totalTimeCost = totalTimeCost;
    }

    public String getProperty() {
        return property;
    }

    public void setProperty(String property) {
        this.property = property;
    }

    public Instant getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Instant gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Instant getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Instant gmtModified) {
        this.gmtModified = gmtModified;
    }
}
